package ${packageName};
                    
import mobile.game.core.Service;
import mobile.game.core.gen.proxy.RPCImplBase;
import ${packageName}.${className}Proxy.EnumCall;
import mobile.game.core.support.function.*;
<#if importPackages??>
<#list importPackages as package>
import ${package};
</#list>
</#if>
import mobile.game.core.gen.JowGenFile;

${mainAnnotation}
@JowGenFile
public final class ${className}Impl extends RPCImplBase {
	
	/**
	 * 获取函数指针
	 */
	@Override	
	public Object getMethodFunction(Service service, int methodKey) {
		${className} serv = (${className})service;
		switch (methodKey) {
			<#list methods as method>
			case EnumCall.${method.enumCall}: {
				<#if method.hasException>
				JowFunction${method.paramsSize}${method.functionTypes} f = (${method.paramsCall}) -> { try { serv.${method.name}(${method.paramsCall}); } catch(Exception e) { throw new mobile.game.core.support.SysException(e); } };
				return f;
				<#else>
				return (JowFunction${method.paramsSize}${method.functionTypes})serv::${method.name};
				</#if>
			}
			</#list>
			default: break;
		}
		return null;
	}

}
